package com.ruoyi.web.wx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wx.mapper.TrashSettingMapper;
import com.ruoyi.web.wx.entity.TrashSetting;
import com.ruoyi.web.wx.service.ITrashSettingService;
import com.ruoyi.common.core.text.Convert;

/**
 * 回收垃圾设置奖励 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-27
 */
@Service
public class TrashSettingServiceImpl implements ITrashSettingService 
{
	@Autowired
	private TrashSettingMapper trashSettingMapper;

	/**
     * 查询回收垃圾设置奖励信息
     * 
     * @param id 回收垃圾设置奖励ID
     * @return 回收垃圾设置奖励信息
     */
    @Override
	public TrashSetting selectTrashSettingById(String id)
	{
	    return trashSettingMapper.selectTrashSettingById(id);
	}
	
	/**
     * 查询回收垃圾设置奖励列表
     * 
     * @param trashSetting 回收垃圾设置奖励信息
     * @return 回收垃圾设置奖励集合
     */
	@Override
	public List<TrashSetting> selectTrashSettingList(TrashSetting trashSetting)
	{
	    return trashSettingMapper.selectTrashSettingList(trashSetting);
	}
	
    /**
     * 新增回收垃圾设置奖励
     * 
     * @param trashSetting 回收垃圾设置奖励信息
     * @return 结果
     */
	@Override
	public int insertTrashSetting(TrashSetting trashSetting)
	{
	    return trashSettingMapper.insertTrashSetting(trashSetting);
	}
	
	/**
     * 修改回收垃圾设置奖励
     * 
     * @param trashSetting 回收垃圾设置奖励信息
     * @return 结果
     */
	@Override
	public int updateTrashSetting(TrashSetting trashSetting)
	{
	    return trashSettingMapper.updateTrashSetting(trashSetting);
	}

	/**
     * 删除回收垃圾设置奖励对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTrashSettingByIds(String ids)
	{
		return trashSettingMapper.deleteTrashSettingByIds(Convert.toStrArray(ids));
	}
	
}
